<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      >
    <h:head> 
        <title> survey</title>
    </h:head> 
    <h1>Survey result</h1>
    <script type="text/javascript">
            var chartStyle = {
                padding:20,
                legend: {
                    display:"right",
                    spacing:10
                }
            };
    </script>

    <h:body>


        <h:form> <!--get the 2 entry: TTA outlet and one total outlet--><!--survey question heading-->


            <p:columnChart value="#{surveyMB.getResult()}" var="survey" xfield="#{survey.question}"
                           style="chartStyle" titleX="Survey question" titleY="Result">
                <p:chartSeries label="You" value="#{survey.outletResult}" />
                <p:chartSeries label="Competitors" value="#{survey.overallResult}" />
            </p:columnChart>
            <h:outputText value ="No of Reviews: #{surveyMB.noOfReviews}"/>



        </h:form>
    </h:body>
    <h3> Results are calculated based on average scores collected from survey. </h3>
</html> 


